<!DOCTYPE html>
<html>
    <head>
        <title>获取数组某些元素 - drop的实现</title>
        <script src="../../src/array/drop.js"></script>
    </head>
    <body>
        <script>
            console.log(drop([1, 2, 3, 4, 5], 2)) // [3, 4, 5]
            console.log(drop([1, 2, 3, 4, 5], 3)) // [4, 5]
            console.log(drop([1, 2, 3, 4, 5], 5)) // []
            console.log(drop([1, 2, 3, 4, 5], 0)) // [1, 2, 3, 4, 5]

            console.log(dropRight([1, 2, 3, 4, 5], 2)) // [1, 2, 3]
            console.log(dropRight([1, 2, 3, 4, 5], 3)) // [1, 2]
            console.log(dropRight([1, 2, 3, 4, 5], 5)) // []
            console.log(dropRight([1, 2, 3, 4, 5], 0)) // [1, 2, 3, 4, 5]
        </script>
    </body>
</html>